package com.fira.edu.service.impl;

import java.util.List;
import com.fira.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fira.edu.mapper.EduRollcallMessageRefMapper;
import com.fira.edu.domain.EduRollcallMessageRef;
import com.fira.edu.service.IEduRollcallMessageRefService;
import com.fira.common.core.text.Convert;

/**
 * 上课点名消息通知Service业务层处理
 * 
 * @author zhushuyong
 * @date 2021-10-27
 */
@Service
public class EduRollcallMessageRefServiceImpl implements IEduRollcallMessageRefService 
{
    @Autowired
    private EduRollcallMessageRefMapper eduRollcallMessageRefMapper;

    /**
     * 查询上课点名消息通知
     * 
     * @param id 上课点名消息通知ID
     * @return 上课点名消息通知
     */
    @Override
    public EduRollcallMessageRef selectEduRollcallMessageRefById(String id)
    {
        return eduRollcallMessageRefMapper.selectEduRollcallMessageRefById(id);
    }

    /**
     * 查询上课点名消息通知列表
     * 
     * @param eduRollcallMessageRef 上课点名消息通知
     * @return 上课点名消息通知
     */
    @Override
    public List<EduRollcallMessageRef> selectEduRollcallMessageRefList(EduRollcallMessageRef eduRollcallMessageRef)
    {
        return eduRollcallMessageRefMapper.selectEduRollcallMessageRefList(eduRollcallMessageRef);
    }

    /**
     * 新增上课点名消息通知
     * 
     * @param eduRollcallMessageRef 上课点名消息通知
     * @return 结果
     */
    @Override
    public int insertEduRollcallMessageRef(EduRollcallMessageRef eduRollcallMessageRef)
    {
        eduRollcallMessageRef.setCreateTime(DateUtils.getNowDate());
        return eduRollcallMessageRefMapper.insertEduRollcallMessageRef(eduRollcallMessageRef);
    }

    /**
     * 修改上课点名消息通知
     * 
     * @param eduRollcallMessageRef 上课点名消息通知
     * @return 结果
     */
    @Override
    public int updateEduRollcallMessageRef(EduRollcallMessageRef eduRollcallMessageRef)
    {
        eduRollcallMessageRef.setUpdateTime(DateUtils.getNowDate());
        return eduRollcallMessageRefMapper.updateEduRollcallMessageRef(eduRollcallMessageRef);
    }

    /**
     * 删除上课点名消息通知对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteEduRollcallMessageRefByIds(String ids)
    {
        return eduRollcallMessageRefMapper.deleteEduRollcallMessageRefByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除上课点名消息通知信息
     * 
     * @param id 上课点名消息通知ID
     * @return 结果
     */
    @Override
    public int deleteEduRollcallMessageRefById(String id)
    {
        return eduRollcallMessageRefMapper.deleteEduRollcallMessageRefById(id);
    }
}
